TcpListener::bind now takes 1 argument instead of 2
authorPaul Woolcock <paul@woolcock.us>
Thu, 6 Nov 2014 13:08:38 +0000 (08:08 -0500)
committerPaul Woolcock <paul@woolcock.us>
Thu, 6 Nov 2014 13:08:38 +0000 (08:08 -0500)
tests/test_cargo_build_auth.rs

index 2ad72d334dd2bfa693abe971a10ed8fa1ae19da6..177e17b1d3b03a5b2e7fe334acbbb987d9bb9486 100644 (file)
@@ -20,7 +20,7 @@ impl Drop for Closer {
 
 // Test that HTTP auth is offered from `credential.helper`
 test!(http_auth_offered {
-    let mut listener = TcpListener::bind("127.0.0.1", 0).assert();
+    let mut listener = TcpListener::bind("127.0.0.1:0").assert();
     let addr = listener.socket_name().assert();
     let mut a = listener.listen().unwrap();
     let a2 = a.clone();
@@ -127,7 +127,7 @@ Caused by:
 
 // Boy, sure would be nice to have a TLS implementation in rust!
 test!(https_something_happens {
-    let mut listener = TcpListener::bind("127.0.0.1", 0).assert();
+    let mut listener = TcpListener::bind("127.0.0.1:0").assert();
     let addr = listener.socket_name().assert();
     let mut a = listener.listen().unwrap();
     let a2 = a.clone();
@@ -180,7 +180,7 @@ Caused by:
 
 // Boy, sure would be nice to have an SSH implementation in rust!
 test!(ssh_something_happens {
-    let mut listener = TcpListener::bind("127.0.0.1", 0).assert();
+    let mut listener = TcpListener::bind("127.0.0.1:0").assert();
     let addr = listener.socket_name().assert();
     let mut a = listener.listen().unwrap();
     let a2 = a.clone();